1. Field of the Invention
The present invention relates to the field of computer graphics and, in particular, to techniques for a continuum based model for position based dynamics.
2. Description of the Related Art
Improving realism is a key factor driving development of new generations of computer graphics systems. Tremendous strides have been made improving realism with respect to lighting, surface features and texture, and dynamics for rigid objects. Progress has also been made in simulating dynamics of soft objects, such as thin cloth objects in a range of different environments. Highly realistic cloth simulation can produce visually appealing animation, and contribute a high degree of overall realism to a graphics scene. However, simulating the dynamics of cloth objects has conventionally been challenged by locking and convergence problems.
One class of conventional simulator for object dynamics implements techniques based on integration of force and mass over time to indirectly compute updated position information. For example, a mesh of vertices defines a surface for a soft object. Each vertex within the mesh comprises a particle with attributes of mass and position. Velocity for a given vertex may be computed by integrating the effective acceleration for the vertex due to an applied force. A distance constraint may be established between vertices to maintain an appropriate physical structure for the mesh. During simulation, a new position for each vertex within the mesh is computed via time integration, while adhering to physical constraints, such as one or more distance constraints. If a physical constraint is violated, then additional iterations for each vertex may be executed to attempt to converge on a valid solution. A given mesh may not easily converge or it may converge into a physically meaningless configuration and become “locked” in the configuration. Both scenarios degrade the quality of simulator results and oftentimes require intervention from a user.
Another class of conventional simulator for object dynamics implements position based dynamics (PBD) rather than force-based time integration simulation. The central theme of PBD is to use constraints to directly update vertex position, instead of calculating forces that indirectly influence position via time integration. In cloth simulation, the most important constraints are distance constraints, because they prevent a simulation mesh from falling apart. One distance constraint is conventionally established per edge within the mesh. A PBD solver performs a sequence of time steps to solve for evolving position state information of vertices within the mesh. A typical PBD time step involves a set of simulation steps that iteratively project all of distance constraints within the mesh. Typically, one simulation step involves several constraint projection steps that each solves an approximation of a distance constraint. The mesh is commonly represented as a collection of triangles. Unfortunately, a triangle with three distance constraints along its edges does not allow for any internal deformation, leading to a high propensity of meshes locking during simulation. One solution to locking in PBD simulators is to implement non-rigid distance constraints. Greater slack in the non-rigid distance constraints for a mesh leads to a greater likelihood that the PBD solver will converge without locking. Unfortunately, increasing slack in the distance constraints makes the mesh appear to be stretchy. Unless a cloth being modeled by the mesh is supposed to be stretchy, this is a highly undesirable outcome.
As the foregoing illustrates, what is needed in the art is an efficient technique for simulating object dynamics that avoids locking.